/**
 * Created by yazhou on 17/6/28.
 */

'use strict'

const constants = {
	WX_HEADER_CODE: 'X-WX-Code',
	WX_HEADER_NO_CHECK: 'X-WX-No-Check',
	WX_HEADER_ENCRYPTED_DATA: 'X-WX-Encrypted-Data',
	WX_HEADER_RAW_DATA: 'X-WX-Raw-Data',
	WX_HEADER_SIGNATURE: 'X-WX-Signature',
	WX_HEADER_IV: 'X-WX-IV',
	WX_HEADER_SKEY: 'X-WX-Skey',
	WX_HEADER_EXPIRE: 'X-WX-Expire',
	WX_HEADER_SIGN: 'X-WX-Sign',
	
	// session id => 验证小程序登录
	WX_SESSION_MAGIC_ID: 'GFR9MHUQDBO-4CRTT0IQU6-45DSN4RLVHG',
	// auth id => 验证用户登录
	WX_AUTH_MAGIC_ID: 'SM8QPEO8H48-7LRQ7TP7GNG-GMLBP85AO2G',
	
	ERR_INVALID_PARAMS: 'ERR_INVALID_PARAMS',
	
	ERR_WX_LOGIN_FAILED: 'ERR_WX_LOGIN_FAILED',
	ERR_WX_GET_USER_INFO: 'ERR_WX_GET_USER_INFO',
	ERR_LOGIN_TIMEOUT: 'ERR_LOGIN_TIMEOUT',
	ERR_LOGIN_FAILED: 'ERR_LOGIN_FAILED',
	ERR_LOGIN_SESSION_NOT_RECEIVED: 'ERR_LOGIN_MISSING_SESSION',
	
	ERR_INVALID_SESSION: 'ERR_INVALID_SESSION',
	ERR_CHECK_LOGIN_FAILED: 'ERR_CHECK_LOGIN_FAILED',
  
  // API请求来源
  SOURCE: 10,
	
  // 版本号
  DIV: '4.3.0',

  OFASHION_API_DIV: '8.0.3'
}

export { constants }
